<template>
  <Transition name="fade-transform" mode="out-in">
    <keep-alive>
      <component :is="optionType" :detail="detail" :file-syncid="fileSyncid" @option-changed="optionChangeHandler"/>
    </keep-alive>
  </Transition>
</template>

<script>
import NProgress from 'nprogress' // 进度条组件
import query from './query.vue';

// import addCategory from './addCategory.vue'
// import addEdit from './addEdit.vue'

export default {
  name: 'DocumentManage',
  // components: { query, addCategory, addEdit },
  components: { query },
  data() {
    return {
      optionType: 'query',
      detail: {},
      fileSyncid: ''
    }
  },
  methods: {
    optionChangeHandler(optionType = 'query', detail = {}, fileSyncid) {
      NProgress.start()
      this.detail = detail
      this.optionType = optionType
      this.fileSyncid = fileSyncid
      NProgress.done()
    }
  }
}
</script>
